<template>
      <div>
             <div @click="clickDataFm" >
                  <div v-for="item in dataData"   :key="item.id"   :data-msg="item.id">
                            <span> {{item.name}} </span>
                  </div> 
             </div> 
             <clickVue @click.native="demoClickFm"></clickVue>
      </div>
</template>
<script>
import clickVue from "./components/clickVue.vue"
export default {
  components:{clickVue},
  data() {
    return {
          dataData:[
               {
                 id:"1",
                 name:"小明",
               },
                 {
                 id:"2",
                 name:"小红",
               },
                {
                 id:"3",
                 name:"小黑",
               }
          ]
    };
  },
  methods: {
         clickDataFm(e){
                  console.log('//////')
                  console.log(e)
                  let msg=e.target.getAttribute('data-msg');
                  console.log(msg)
                   console.log('//////')
         },
         demoClickFm(){
            console.log('我触发了吗')
         }
  
  },
};
</script>